From 39cf125c179ae478e493313736c033078865fb4b Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 27 Mar 2025 15:25:49 +0100 Subject: [PATCH] no need to disable buffering from Qt in POST requests data of the files are ready in a memory buffer so Qt will not buffer them anyway Signed-off-by: Matthieu Gallien --- src/libsync/putmultifilejob.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/libsync/putmultifilejob.cpp b/src/libsync/putmultifilejob.cpp index 99825dd04..5c132de33 100644 --- a/src/libsync/putmultifilejob.cpp +++ b/src/libsync/putmultifilejob.cpp @@ -41,8 +41,6 @@ void PutMultiFileJob::start() { QNetworkRequest req; - auto fullSize = 0; - for(const auto &oneDevice : _devices) { // Our rate limits in UploadDevice::readData will cause an application freeze if used here. // QHttpMultiPart's internal QHttpMultiPartIODevice::readData will loop over and over trying @@ -53,7 +51,6 @@ void PutMultiFileJob::start() auto onePart = QHttpPart{}; - fullSize += oneDevice._device->size(); if (oneDevice._device->size() == 0) { onePart.setBody({}); } else { @@ -74,9 +71,6 @@ void PutMultiFileJob::start() _body.append(onePart); } - req.setAttribute(QNetworkRequest::DoNotBufferUploadDataAttribute, true); - req.setHeader(QNetworkRequest::ContentLengthHeader, fullSize); - sendRequest("POST", _url, req, &_body); if (reply()->error() != QNetworkReply::NoError) { -- 2.30.2